//
//  LJYHomeController.swift
//  新浪微博
//
//  Created by 李俊扬 on 2017/6/29.
//  Copyright © 2017年 李俊扬. All rights reserved.
//

import UIKit

class LJYHomeController: LJYBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        if !isLogin {
            visitorView?.setupVisitorViewInfo(imgName: nil, title: nil)
            return
        }

        setupUI()
    }
    
    // 视图
    private func setupUI() {
        
        setupNav()
    }
    
    @objc private func leftButtonClick() {
        
        print("左侧按钮点击")
    }
    
    @objc private func rightButtonClick() {
        
        let tempVC = LJYTempController()
        // 隐藏tabBar
        navigationController?.pushViewController(tempVC, animated: true)
    
    }
    
    // 设置导航栏
    private func setupNav() {
        
        // 左侧按钮
        navigationItem.leftBarButtonItem = UIBarButtonItem(imgName: "navigationbar_pop", title: nil, target: self, action: #selector(leftButtonClick))
        
        // 右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imgName: "navigationbar_friendsearch", title: nil, target: self, action: #selector(rightButtonClick))
    }
    
}
